<template>
  <div class="wrap">
    <div class="box">
      <div class="top">
        <div class="orderNum">001</div>
        <div class="type">外卖订单</div>
        <div class="status">待接单</div>
      </div>
      <div class="customer">
        <div class="icon">
          <img src="../../../../static/img/business/local.png" alt="" />
        </div>
        <div class="userInfo">
          <div class="name">
            <span>李先生</span>
            <span>18621710780</span>
          </div>
          <div class="address">上海市黄浦区翠华路169号嘉林广场</div>
        </div>
        <div class="tel" @click="call(tel)">
          <img src="../../../../static/img/business/tel.png" alt="" />
        </div>
      </div>
      <div class="goodsInfo">
        <div class="title">商品</div>
        <div class="remarks">
          <div class="remark">备注：</div>
          <div>尽快送达，不要迟到哦！尽快送达，不要迟到哦 尽快送达，不要迟到哦!</div>
        </div>
        <div class="title">商品(6)</div>
        <div class="goodsList">
          <div class="goodsBox">
            <div class="goods">川湘辣子鸡（小份+米饭）</div>
            <div class="goodsNum">×2</div>
            <div class="goodsPrice">￥9.9</div>
          </div>
          <div class="goodsBox">
            <div class="goods">川湘辣子鸡（小份+米饭）</div>
            <div class="goodsNum">×2</div>
            <div class="goodsPrice">￥9.9</div>
          </div>
          <el-collapse-transition>
            <div v-show="showInfo">
              <div class="transition-box">
                <div class="goodsBox">
                  <div class="goods">川湘辣子鸡（小份+米饭）</div>
                  <div class="goodsNum">×2</div>
                  <div class="goodsPrice">￥9.9</div>
                </div>
                <div class="goodsBox">
                  <div class="goods">川湘辣子鸡（小份+米饭）</div>
                  <div class="goodsNum">×2</div>
                  <div class="goodsPrice">￥9.9</div>
                </div>
              </div>
            </div>
          </el-collapse-transition>
          <p @click="showInfo = !showInfo" class="xjt">
            <span>{{showInfo?'收起':'展开更多'}}</span>
            <img :src="showInfo?'../../static/img/sjt111.png':'../../static/img/xiajiantou11.png'" alt="">
          </p>
        </div>
      </div>
      <div class="orderInfo">
        <div class="time">
          <span>下单时间：</span>
          <span>2020-05-01 12:38:26</span>
        </div>
        <div class="sn">
          <span>订单编号：</span>
          <span>2020265892598746</span>
        </div>
        <div class="price">
          <span>订单总额</span>
          <span>￥59.9</span>
        </div>
      </div>
      <div class="btn">
        <div class="refuse">拒绝</div>
        <div class="sure">接单</div>
      </div>
    </div>
    <div class="box">
      <div class="top">
        <div class="orderNum">002</div>
        <div class="type">自取订单</div>
        <div class="status">待接单</div>
      </div>
      <div class="customer">
        <div class="icon">
          <img src="../../../../static/img/business/local.png" alt="" />
        </div>
        <div class="userInfo">
          <div class="name">
            <span>李先生</span>
            <span>18621710780</span>
          </div>
          <div class="address">上海市黄浦区翠华路169号嘉林广场</div>
        </div>
        <div class="tel">
          <img src="../../../../static/img/business/tel.png" alt="" />
        </div>
      </div>
      <div class="goodsInfo">
        <div class="title">商品</div>
        <div class="remarks">
          <div class="remark">备注：</div>
          <div>尽快送达，不要迟到哦！尽快送达，不要迟到哦 尽快送达，不要迟到哦!</div>
        </div>
        <div class="title">商品(6)</div>
        <div class="goodsList">
          <div class="goodsBox">
            <div class="goods">川湘辣子鸡（小份+米饭）</div>
            <div class="goodsNum">×2</div>
            <div class="goodsPrice">￥9.9</div>
          </div>
          <div class="goodsBox">
            <div class="goods">川湘辣子鸡（小份+米饭）</div>
            <div class="goodsNum">×2</div>
            <div class="goodsPrice">￥9.9</div>
          </div>
          <el-collapse-transition>
            <div v-show="showInfo1">
              <div class="transition-box">
                <div class="goodsBox">
                  <div class="goods">川湘辣子鸡（小份+米饭）</div>
                  <div class="goodsNum">×2</div>
                  <div class="goodsPrice">￥9.9</div>
                </div>
              </div>
            </div>
          </el-collapse-transition>
          <p @click="showInfo1 = !showInfo1" class="xjt">
            <span>{{showInfo1?'收起':'展开更多'}}</span>
            <img :src="showInfo1?'../../static/img/sjt111.png':'../../static/img/xiajiantou11.png'" alt="">
          </p>
        </div>
      </div>
      <div class="orderInfo">
        <div class="time">
          <span>下单时间：</span>
          <span>2020-05-01 12:38:26</span>
        </div>
        <div class="sn">
          <span>订单编号：</span>
          <span>2020265892598746</span>
        </div>
        <div class="price">
          <span>订单总额</span>
          <span>￥59.9</span>
        </div>
      </div>
      <div class="btn">
        <div class="refuse">拒绝</div>
        <div class="sure">接单</div>
      </div>
    </div>
  </div>
</template>

<script>
  import Vue from 'vue';
  import { Switch } from 'vant';

  Vue.use(Switch);

  export default {
    name: "orderAll",
    data() {
      return {
        checked: true,
        showInfo:false,
        showInfo1:false,
        tel:17391751754
      };
    },
    methods:{
      jump(page){
        this.$router.push({
          name:page
        })
      },
      call(phone){
        // 调用拨号功能
        window.location.href = 'tel://' + phone;
      },
    }
  }
</script>

<style scoped>
  .box {
    width: 3.53rem;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 .03rem .15rem 0 rgba(4, 0, 0, 0.15);
    border-radius: .04rem;
    margin: 0 auto .16rem;
    overflow: hidden;
  }
  .top{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .1rem .1rem;
    background: #FAFAFA;
  }
  .orderNum{
    border-radius: .02rem;
    background:linear-gradient(81deg,rgba(251,68,72,1) 0%,rgba(254,111,77,1) 100%);
    padding: .02rem .1rem;
    color: #ffffff;
    font-size: .17rem;
  }
  .type{
    font-size: .14rem;
    margin-left: .08rem;
    border: .01rem solid #FB4448;
    color: #FB4448;
    border-radius: 3rem;
    padding: .01rem .1rem;
  }
  .status{
    flex-grow: 1;
    text-align: right;
    font-size: 0.16rem;
    color: #FB4448;
  }
  .customer{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.14rem .1rem;
  }
  .userInfo{
    flex-grow: 1;
    margin-left: .1rem;
  }
  .name{
    font-size: .15rem;
    color: #333333;
  }
  .name span{
    margin-right: .14rem;
  }
  .address{
    font-size: .14rem;
    color: #666666;
    margin-top: .04rem;
  }
  .icon{
    width: .18rem;
  }
  .tel{
    width: .28rem;
    margin-right: .12rem;
  }
  .goodsInfo{
    padding: .1rem;
    border-top: 1px solid #EBEBEB;
  }
  .title{
    font-size: .15rem;
  }
  .remarks{
    background: #F4F4F4;
    padding: .1rem;
    margin-top: .06rem;
    display: flex;
    font-size: .13rem;
    color: #666666;
  }
  .remark{
    color: #FB4448;
    width: .6rem;
  }
  .goodsList{

  }
  .goodsBox{
    display: flex;
    justify-content: space-between;
    margin-top: .1rem;
  }
  .goods{
    flex-grow: 1;
  }
  .goodsNum{
    width: .6rem;
  }

  .xjt {
    display: flex;
    flex-flow: row;
    align-items: center;
    justify-content: center;
    padding-top: 0.18rem;
  }
  .xjt>img {
    width: .12rem;
    height: .07rem;
    margin-left: .1rem;
  }
  .xjt>span {
    font-size:.13rem;
    font-family:PingFang SC;
    font-weight:500;
    color: #666666;
  }

  .orderInfo{
    padding: .1rem;
    border-top: 1px solid #EBEBEB;
    border-bottom: 1px solid #EBEBEB;
  }
  .sn{
    margin: .1rem 0;
  }
  .price{
    display: flex;
    justify-content: space-between;
  }
  .price>span:nth-child(2){
    margin-right: .15rem;
    font-size: .18rem;
    color: #FB4448;
    font-weight: bold;
  }
  .btn{
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: .12rem 0;
  }
  .refuse{
    border: 1px solid #FB5256;
    color: #FB5256;
    font-size: .15rem;
    width: .83rem;
    height: .34rem;
    line-height: .36rem;
    border-radius: .18rem;
    text-align: center;
    margin-right: .12rem;
  }
  .sure{
    background: linear-gradient(0deg,rgba(251,68,72,1) 0%,rgba(254,111,77,1) 100%);
    width: 1.15rem;
    height: .36rem;
    line-height: .36rem;
    border-radius: .18rem;
    color: #ffffff;
    text-align: center;
    margin-right: .1rem;
    font-size: .15rem;
  }
</style>
